package com.jollychic.www.roomdatebasedemo;

import com.jollychic.www.roomdatebasedemo.app.RMApplication;
import com.jollychic.www.roomdatebasedemo.dao.IDrinkDao;
import com.jollychic.www.roomdatebasedemo.dao.IGoodsDao;
import com.jollychic.www.roomdatebasedemo.dao.IStoreDao;

/**
 * desc:  <br/>
 * author: 李超杰 <br/>
 * time: 2018/4/20 0020 22:26 <br/>
 * since: V 6.1X <br/>
 */
public final class DaoManager {

    private DaoManager() {
    }

    public static DaoManager getInstance() {
        return Holder.INSTANCE;
    }

    public IStoreDao getIStoreDao() {
        return RMApplication.getInstance().getDateBase().storeDao();
    }

    public IGoodsDao getIGoodsDao() {
        return RMApplication.getInstance().getDateBase().goodsDao();
    }

    public IDrinkDao getIDrinkDao() {
        return RMApplication.getInstance().getDateBase().drinkDao();
    }

    private static final class Holder {
        public static final DaoManager INSTANCE = new DaoManager();
    }

}
